package net.cathackers.devel.scmp.chat.impl.xmpp.iqcomponent.interfaces;

/**
 * this interface used as implementation of Observer pattern. to improve
 * scalability
 * 
 * @param <T>
 */
public interface Observable<T> {
    /**
     * add new listener.
     * 
     * @param listener
     * @return true if listener was registered.otherwise will return false
     */
    public boolean register(T listener);

    /**
     * remove listener
     * 
     * @param listener
     * @return true if listener was unregistered.otherwise will return false
     */
    public boolean unregister(T listener);
}